Technical Field
The present disclosure relates to a method of processing an image data, an image processing apparatus, and a non-transitory computer-readable medium.
Description of the Related Art
An inkjet printer is a type of image forming apparatuses that discharges (jets) ink droplets onto a recording medium such as paper to form an image. Inkjet printers include a recording head having a plurality of nozzles from which ink droplets are discharged.
Recording heads are categorized into two major types. One is a recording head that is moved in a main scanning direction, which is a direction orthogonal to a direction in which a recording medium is conveyed. The other is a recording head that remains stationary and is not moved in the main scanning direction. A typical inkjet printer includes a plurality of recording heads, each ejecting ink of different colors.
Ink droplets are sometimes not discharged normally from nozzles in the recording head due to failure of an actuator, dust attached to the nozzle, etc. The quality of an image formed on a recording medium is degraded as a result. Such nozzle that cannot discharge ink droplets normally is referred to as a “defective nozzle” hereinafter. For this reason, a typical inkjet printer is provided with a system or a mechanism that enables one to check whether ink droplets are discharged appropriately from each nozzle.
Images are categorized into two groups. One is a binary image whose pixel color is expressed by two values. The other is a multilevel image whose pixel color is expressed by multiple values. Color density varies depending on a size of ink droplets. Most inkjet printers are capable of discharging different sizes of ink droplets to process a multilevel image.
Image data of a multilevel image is data of a group of pixels, each pixel expressing a color. The pixel data expresses each color in a plurality of bits. However, the number of sizes of ink droplets that the inkjet printer can discharge usually smaller than the number of tone levels that the pixel data express for each color. For this reason, most inkjet printers perform color quantization to reduce the number of tone levels for each color and discharges ink droplets of the same type to different positions multiple times to reproduce the color of one pixel. A part that is formed by one discharge of an ink droplet is referred to as a “dot” hereinafter, in order to distinguish it over a pixel.
Assuming that the number of gradations formed by different sizes of ink droplets is 16 for each color while the number of tone levels expressed by pixel data is 256 for each color, the color of one pixel is reproduced by discharging ink droplets sixteen (=256/16) times for each color. Assuming that an inkjet printer capable of discharging ink of four colors discharges ink of each color to different positions, the color of one pixel is reproduced by sixty-four discharges of ink. Accordingly, one pixel may be expressed by a block constituted by 64 (=8×8) dots. This block of 8×8 dots is composed of a group of 16 sub-blocks, each being constituted by 4 (2×2) dots.
When color quantization is performed to reduce the number of tone levels from 256 to 16, a large error is likely to occur due to the quantization. Thus, by compounding, the error of the entire formed image may be too large to ignore. To address this issue, various operations of reducing the error of the entire formed image are performed, one of which is error diffusion.
Error diffusion is an operation in which an error that occurs due to color quantization is distributed to neighboring pixels to minimize the error of an entire image. Specifically, the inkjet printer as described above in which one piece of pixel data in image data is expressed by the block of 8×8 dots performs error diffusion in units of the sub-block constituted by 2×2 dots.
An inkjet printer repeats printing on a row-by-row basis to form an image on a recording medium. The row is a series of dots aligning in the main scanning direction, referred to as a “line” hereinafter. When there is a defective nozzle in the recording head that moves in the main scanning direction, ink droplets are not discharged where the defective nozzle supposed to discharge ink droplets.